﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="Web.Admin.Page_Channel.Edit" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<!DOCTYPE html>

<%="<!--[if IE 8]> <html class=\"ie8 no-js\"> <![endif]-->"%>
<%="<!--[if IE 9]> <html class=\"ie9 no-js\"> <![endif]-->"%>
<%="<!--[if !IE]><!-->"%>
<html>
<%="<!--<![endif]-->"%>
    <!-- BEGIN HEAD -->

    <head>
        <meta charset="utf-8" />
        <title><%=Evan.Common.CommFun.GetAppSetting("AdminTitle") %> - 后台管理系统</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1" name="viewport" />
        <!-- #include file="../include/com_res_css.inc" -->
    </head>
    <!-- END HEAD -->

    <body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
        <!-- BEGIN HEADER -->
        
        <!-- #include file="../include/top_bar.inc" -->

        <!-- END HEADER -->
        <!-- BEGIN HEADER & CONTENT DIVIDER -->
        <div class="clearfix"> </div>
        <!-- END HEADER & CONTENT DIVIDER -->
        <!-- BEGIN CONTAINER -->
        <div class="page-container">
            <!-- BEGIN SIDEBAR -->
            
            <!-- #include file="../include/left_menu.inc" -->
            
            <!-- END SIDEBAR -->
            <!-- BEGIN CONTENT -->
            <div class="page-content-wrapper">
                <!-- BEGIN CONTENT BODY -->
                <div class="page-content">
                    <!-- BEGIN PAGE HEADER-->
                    <!-- BEGIN THEME PANEL -->
                    <!-- #include file="../include/theme_panel.inc" -->
                    <!-- END THEME PANEL -->
                    
                    <!-- BEGIN PAGE TITLE-->
                    <h3 class="page-title"> 栏目管理</h3>
                    <!-- END PAGE TITLE-->
                    <!-- END PAGE HEADER-->
                    <!-- BEGIN PAGE CONTENT-->

                                    <div class="portlet light bordered">
                                        <div class="portlet-title tabbable-line">

                                            <ul class="nav nav-tabs ">
                                                <li class="active">
                                                    <a href="#tab_1" data-toggle="tab" aria-expanded="true"> 基本信息 </a>
                                                </li>
                                                
                                                <% if (GlobalConfigModel.Dev || GlobalConfigModel.IsModuleSystem || CheckCopyWebPath(Model)) { %>
                                                    <li class="">
                                                        <a href="#tab_3" data-toggle="tab" aria-expanded="false"> 模板信息 </a>
                                                    </li>
                                                <%} %>
                                                <% if (GlobalConfigModel.Dev || GlobalConfigModel.IsModuleSystem) { %>
                                                    <li class="">
                                                        <a href="#tab_4" data-toggle="tab" aria-expanded="false"> 模板编辑 </a>
                                                    </li>
                                                    <%if(Evan.Member.Administrator.IsSuperAdmin()){ %>
                                                        <li class="">
                                                            <a href="#tab_5" data-toggle="tab" aria-expanded="false"> 高级设置 </a>
                                                        </li>
                                                    <%} %>
                                                <%} %>
                                                  <%if (Model == null || Model.ChannelSeo == 1)  {%>
                                                <li class="">
                                                    <a href="#tab_2" data-toggle="tab" aria-expanded="false"> SEO信息 </a>
                                                </li>
                                                <% } %>

                                            </ul>
                                        
                                            <div class="caption">
                                                <i class="glyphicon glyphicon-list-alt font-red"></i>
                                                <span class="caption-subject font-red bold uppercase">栏目管理</span>
                                            </div>

                                        </div>
                                        <div class="tab-content">

                                            <div class="tab-pane active" id="tab_1">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <div class="form-body">
 
                                                            <% 
                                                                
                                                                Dictionary<string, string> Parents = new Dictionary<string, string>();
                                                                Parents.Add("0", "顶级栏目");
                                                                foreach (var item in Channel_List)
                                                                {
                                                                    Parents.Add(item.Id.ToString(), Deep(item.Deep) +" "+ item.Title);
                                                                }

                                                                Evan.Model.SysModel.HtmlHelperModel m0 = new Evan.Model.SysModel.HtmlHelperModel { Title = "所属栏目", PlaceHoder = "父级栏目", Notice = "父级栏目选择", FieldName = "ParentId", FieldVerify = "", MaxLength = 100, FieldType = "select", SelectItem = Parents, DefaultValue = "0" };
                                                                
                                                                Evan.Model.SysModel.HtmlHelperModel m1 = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目标题", PlaceHoder = "栏目标题", Notice = "栏目标题", FieldName = "Title", FieldVerify = "notnull", MaxLength = 100, FieldType = "input" };
                                                                Evan.Model.SysModel.HtmlHelperModel m2 = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目副标题", PlaceHoder = "栏目副标题", Notice = "栏目副标题", FieldName = "SubTitle", FieldVerify = "notnull", MaxLength = 100, FieldType = "input" };
                                                                Evan.Model.SysModel.HtmlHelperModel m3 = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目英文标题", PlaceHoder = "栏目英文标题", Notice = "栏目英文标题", FieldName = "EnTitle", FieldVerify = "notnull", MaxLength = 100, FieldType = "input" };
                                                                Evan.Model.SysModel.HtmlHelperModel m4 = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目图片", PlaceHoder = "栏目图片", Notice = "栏目图片", FieldName = "ImgUrl", FieldVerify = "", MaxLength = 100, FieldType = "imgupload" };
                                                                Evan.Model.SysModel.HtmlHelperModel m8 = new Evan.Model.SysModel.HtmlHelperModel { Title = "业务图片", PlaceHoder = "业务图片", Notice = "业务图片", FieldName = "SubImgUrl", FieldVerify = "", MaxLength = 100, FieldType = "imgupload" };

                                                                Dictionary<string, string> SortBy = Evan.Common.SysComm.GetChannelOrderBy();
                                                                
                                                                Evan.Model.SysModel.HtmlHelperModel m5 = new Evan.Model.SysModel.HtmlHelperModel { Title = "主排序", PlaceHoder = "栏目内容主排序", Notice = "栏目内容主排序 , 优先按照主排序来排列顺序 . 仅对列表生效", FieldName = "OrderBy", FieldVerify = "", MaxLength = 100, FieldType = "select", SelectItem = SortBy , Id="SortSet",DefaultValue = "2" };
                                                                Evan.Model.SysModel.HtmlHelperModel m6 = new Evan.Model.SysModel.HtmlHelperModel { Title = "副排序", PlaceHoder = "栏目内容副排序", Notice = "栏目内容副排序 , 如果内容有相同条件的主排序造成排序并排 , 则副排序生效 . 仅对列表生效", FieldName = "SubOrderBy", FieldVerify = "", MaxLength = 100, FieldType = "select", SelectItem = SortBy,DefaultValue = "0" };

                                                                Evan.Model.SysModel.HtmlHelperModel m6_1 = new Evan.Model.SysModel.HtmlHelperModel { Title = "分页大小", PlaceHoder = "栏目列表分页大小", Notice = "栏目列表分页大小 , 仅对列表生效", FieldName = "PageSize", FieldVerify = "notnull", MaxLength = 100, FieldType = "input", DefaultValue = "12" };

                                                                Evan.Model.SysModel.HtmlHelperModel m7 = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目备注", PlaceHoder = "栏目备注", Notice = "栏目备注", FieldName = "Content", FieldVerify = "", MaxLength = 0, FieldType = "editor" };
                                                                
                                                               
                                                                //Evan.Model.SysModel.HtmlHelperModel m8 = new Evan.Model.SysModel.HtmlHelperModel { Title = "自定义管理页面", PlaceHoder = "自定义管理页面 , 默认留空", Notice = "自定义管理页面 , 默认留空", FieldName = "PageUrl", FieldVerify = "", MaxLength = 100, FieldType = "input" };
                                                            %>

                                                            <% List<Evan.Model.SysModel.HtmlHelperModel> mm = new List<Evan.Model.SysModel.HtmlHelperModel> ();
                                                               mm.Add(m0);
                                                               mm.Add(m1);
                                                               if (!GlobalConfigModel.IsModuleSystem || GlobalConfigModel.Dev)
                                                               {
                                                                   //如果是模块就不显示这两个
                                                                   mm.Add(m2);
                                                                   mm.Add(m3);
                                                               }
                                                               
                                                               
                                                               mm.Add(m4);
                                                               mm.Add(m8);
                                                               mm.Add(m5);
                                                               mm.Add(m6);
                                                               mm.Add(m6_1);
                                                               if (!GlobalConfigModel.IsModuleSystem || GlobalConfigModel.Dev)
                                                               {
                                                                   //如果是模块就不显示这两个
                                                                   mm.Add(m7);
                                                               }
                                                               //mm.Add(m8);
                                                                %>



                                                            <% 
                                                               foreach (Evan.Model.SysModel.HtmlHelperModel item in mm)
                                                               {
                                                                   Response.Write(Evan.Common.HtmlHelper.HtmlBuild(item));
                                                               }
                                                            %>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="tab-pane" id="tab_2">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <div class="form-body">
                                                                <%
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoTitle = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO标题", PlaceHoder = "请输入Seo标题", Notice = "栏目SEO标题", FieldName = "SeoTitle", FieldVerify = "", MaxLength = 100, FieldType = "input" };
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoKeyWords = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO关键字", PlaceHoder = "请输入SEO关键字", Notice = "栏目SEO关键字", FieldName = "SeoKeyWords", FieldVerify = "", MaxLength = 500, FieldType = "input" };
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoDescription = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO描述", PlaceHoder = "请输入SEO描述", Notice = "栏目SEO描述", FieldName = "SeoDescription", FieldVerify = "", MaxLength = 500, FieldType = "textarea" };

                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoTitle));
                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoKeyWords));
                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoDescription));
                                                                %>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="tab-pane" id="tab_3">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <div class="form-body">
                                                                    <%

                                                                        Evan.Model.SysModel.HtmlHelperModel Pt = new Evan.Model.SysModel.HtmlHelperModel();
                                                                        if (Evan.Common.CommFun.GetAppSetting("IsModuleSystem") == "1")
                                                                        {
                                                                            Pt = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目类型", PlaceHoder = "栏目类型选择", Notice = "栏目类型对应不同的管理页面", FieldName = "PageType", FieldVerify = "notnull", MaxLength = 25, FieldType = "select", SelectItem = Evan.Template.TemplateHelper.PageTypeDicForModule() };
                                                                        }
                                                                        else
                                                                        {
                                                                            Pt = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目类型", PlaceHoder = "栏目类型选择", Notice = "栏目类型对应不同的管理页面", FieldName = "PageType", FieldVerify = "notnull", MaxLength = 25, FieldType = "select", SelectItem = Evan.Template.TemplateHelper.PageTypeDic() };
                                                                        }


                                                                        Evan.Model.SysModel.HtmlHelperModel WebPath = new Evan.Model.SysModel.HtmlHelperModel { Title = "栏目目录", PlaceHoder = "请输入栏目目录", Notice = "对应不同的地址路径 例如 : /news/company/ ( /news/ 为一级栏目, /company/为二级栏目,以此类推 )<br/>只允许输入/和英文字母和数字,优先选择栏目英文标题,禁止使用空格<br/>如果是外链 , 请加上 http:// (如果是 https 请加 https://) <br/> [<a class='NoUseCharInWebPath'>查看规则</a>] , 如果是外链 , 请填写外链地址", FieldName = "WebPath", FieldVerify = "", MaxLength = 1000, FieldType = "input" };
                                                                        Evan.Model.SysModel.HtmlHelperModel ManagePageUrl = new Evan.Model.SysModel.HtmlHelperModel { Title = "管理链接", PlaceHoder = "管理页面链接", Notice = "管理页面链接 , 用于自定义后台管理页面 , 新建的页面必须在 /管理目录/Page/目录中才可以", FieldName = "ManagePageUrl", FieldVerify = "notnull", MaxLength = 1000, FieldType = "input", Hide = true };
                                                                        Evan.Model.SysModel.HtmlHelperModel IsIndexNav = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否导航显示", PlaceHoder = "", Notice = "开启后会在头部导航展示", FieldName = "IsIndexNav", FieldVerify = "", MaxLength = 50, FieldType = "switch" };

                                                                        if (!(GlobalConfigModel.Dev || GlobalConfigModel.IsModuleSystem) && CheckCopyWebPath(Model))
                                                                        {
                                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(WebPath));
                                                                        }
                                                                        else
                                                                        {
                                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(Pt));
                                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(WebPath));
                                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(ManagePageUrl));
                                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(IsIndexNav));
                                                                        }
                                                                    %>
                                                            
                                                                        
                                                                    <% 
                                                                       // Evan.Common.FileManager.Files File_BLL = new Evan.Common.FileManager.Files("/App_Data/");
                                                                       // List<Evan.Model.SysModel.FileModel> files = File_BLL.GetAllByPath("Template", "*.txt", false);

                                                                       // Dictionary<string, string> SkinType = new Dictionary<string, string>();
                                                                       // SkinType.Add("Default", "默认模板");
                                                                       // foreach (var item in files)
                                                                       // {
                                                                       //     if (!item.CurPath.EndsWith("Default"))
                                                                       //     {
                                                                       //         SkinType.Add(item.CurPath.Split('\\')[item.CurPath.Split('\\').Length-1], item.Name.Replace(".txt", ""));    
                                                                       //     }
                                                                       // }
                                                                       
                                                                       // Evan.Model.SysModel.HtmlHelperModel SkinName = new Evan.Model.SysModel.HtmlHelperModel { Title = "模板", PlaceHoder = "模板选择", Notice = "模板对应不同的风格页面", FieldName = "SkinName", FieldVerify = "", MaxLength = 25, FieldType = "select", SelectItem = SkinType };
                                                                       //Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SkinName));
                                                                    %>

                                                            <%--<div class="form-group" id="form-WebPath">
                                                                <label class="control-label col-md-2">栏目目录</label>
                                                                <div class="col-md-6">
                                                                    <input type="text" class="form-control maxlength_defaultconfig" maxlength="1000" field="WebPath"  placeholder="请输入栏目目录" field_type="input">
                                                                    <span class="help-block">栏目目录对应不同的地址路径 例如 : /news/company/ , 如果是外链 , 请填写外链地址</span>
                                                                </div>
                                                            </div>--%>

                                          

                                                            <%--2017.07.18 张浩修改，去掉模板--%>
                                                            <%--<div class="form-group" id="form-SkinName">
                                                                <label class="control-label col-md-2">模板</label>
                                                                <div class="col-md-6">
                                                                    <div class="select2-bootstrap-prepend">
                                                                        <select id="single-prepend-text-SkinName" class="form-control select2 select2-allow-clear col-md-6" field="SkinName" field_type="select">
                                                                        </select>
                                                                    </div>
                                                                    <span class="help-block">模板对应不同的风格页面</span>
                                                                </div>
                                                            </div>--%>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            
                                            <div class="tab-pane" id="tab_4">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <%--------------------------新版流程--------URL规则--模板文件---点击保存栏目的时候生成伪静态规则-----------------%>
                                                        <div class="form-body">
                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">栏目目录</label>
                                                                <div class="col-md-6">
                                                                    <input type="text" class="form-control ChannelCategory"  value="" disabled="disabled" style="border:1px solid #fff; background-color:#fff;" />
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">综合页</label>
                                                                <div class="col-md-4">
                                                                    <input type="text" class="form-control" field="RewriteDefault" placeholder="" field_type="input">
                                                                    <span class="help-block">综合页页面 通常为 <a class="setDefaultValue">default.html</a> / <a class="setDefaultValue">index.html</a> , 留空为无综合页</span>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <% List<dynamic> default_template = new Evan.DataBase.DbOperat("Template").GetList("TemplateType='default' and States=1"); %>
                                                                    <select class="select2 select-select2-Default" field="TemplateDefault" field_type="select">
                                                                        <option value="0">不选择</option>
                                                                        <%foreach (var item in default_template) { %>
                                                                        <option value="<%=item.Id %>"><%=item.Title %> <%= string.IsNullOrEmpty(item.Intro)?"":" - "+item.Intro %></option>  
                                                                        <% } %>
                                                                    </select>
                                                                    <span class="help-block">选择综合页使用的模板 , 不选择为无综合页</span>
                                                                </div>
                                                             </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">列表页</label>
                                                                <div class="col-md-4">
                                                                    <input type="text" class="form-control" field="RewriteList" placeholder="" field_type="input">
                                                                    <span class="help-block">列表页页面 通常为 <a class="setDefaultValue">index_{Page}.html</a> , 留空为无列表页</span>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <% List<dynamic> list_template = new Evan.DataBase.DbOperat("Template").GetList("TemplateType='list' and States=1"); %>
                                                                    <select class="select2 select-select2-List" field="TemplateList" field_type="select">
                                                                        <option value="0">不选择</option>
                                                                        <%foreach (var item in list_template) { %>
                                                                        <option value="<%=item.Id %>"><%=item.Title %> <%= string.IsNullOrEmpty(item.Intro)?"":" - "+item.Intro %></option>  
                                                                        <% } %>
                                                                    </select>
                                                                    <span class="help-block">选择列表页使用的模板 , 不选择为无列表页</span>
                                                                </div>
                                                             </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">详细页</label>
                                                                <div class="col-md-4">
                                                                    <input type="text" class="form-control" field="RewriteDetail" placeholder="" field_type="input">
                                                                    <span class="help-block">详细页页面 通常为 <a class="setDefaultValue">{Id}.html</a> , 留空为无详细面</span>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <% List<dynamic> detail_template = new Evan.DataBase.DbOperat("Template").GetList("TemplateType='detail' and States=1"); %>
                                                                    <select class="select2 select-select2-Detail" field="TemplateDetail" field_type="select">
                                                                        <option value="0">不选择</option>
                                                                        <%foreach (var item in detail_template) { %>
                                                                        <option value="<%=item.Id %>"><%=item.Title %> <%= string.IsNullOrEmpty(item.Intro)?"":" - "+item.Intro %></option>  
                                                                        <% } %>
                                                                    </select>
                                                                    <span class="help-block">选择详细页使用的模板 , 不选择为无列表面</span>
                                                                </div>
                                                             </div>

                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">单页</label>
                                                                <div class="col-md-4">
                                                                    <input type="text" class="form-control" field="RewriteSinglePage" placeholder="" field_type="input" >
                                                                    <span class="help-block">单页页面 通常为 <a class="setDefaultValue">index.html</a> , 留空为无单页面</span>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <% List<dynamic> siglepage_template = new Evan.DataBase.DbOperat("Template").GetList("TemplateType='singlepage' and States=1"); %>
                                                                    <select class="select2 select-select2-SinglePage" field="TemplateSinglePage" field_type="select">
                                                                        <option value="0">不选择</option>
                                                                        <%foreach (var item in siglepage_template) { %>
                                                                        <option value="<%=item.Id %>"><%=item.Title %> <%= string.IsNullOrEmpty(item.Intro)?"":" - "+item.Intro %></option>  
                                                                        <% } %>
                                                                    </select>
                                                                    <span class="help-block">选择单页使用的模板 , 不选择为单页面</span>
                                                                </div>
                                                             </div>

                                                        </div>
                                                        <%-----------------------------------新版流程-----------------------------%>
                                                        <% if (GlobalConfigModel.IsModuleSystem) { %>
                                                        <div class="form-body ">
                                                            <div class="form-group">
                                                                <div class="portlet-body col-md-offset-2">
                                                                    <div class="table-scrollable" style="width:500px;">
                                                                        <table class="table table-bordered  channel_design_table">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th>  </th>
                                                                                    <th> 综合 </th>
                                                                                    <th> 列表 </th>
                                                                                    <th> 详细 </th>
                                                                                    <th> 单页 </th>
                                                                                </tr>
                                                                            </thead>
                                                                            <tbody>
                                                                                <tr>
                                                                                    <td> 综合 </td>
                                                                                    <td class="active"> - </td>
                                                                                    <td class="success"> √ </td>
                                                                                    <td class="danger"> × </td>
                                                                                    <td class="success"> √ </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td> 列表 </td>
                                                                                    <td class="success"> √ </td>
                                                                                    <td class="active"> - </td>
                                                                                    <td class="success"> √ </td>
                                                                                    <td class="danger"> × </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td> 详细 </td>
                                                                                    <td class="danger"> × </td>
                                                                                    <td class="success"> √ </td>
                                                                                    <td class="active"> - </td>
                                                                                    <td class="danger"> × </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td> 单页 </td>
                                                                                    <td class="success"> √ </td>
                                                                                    <td class="danger"> × </td>
                                                                                    <td class="danger"> × </td>
                                                                                    <td class="active"> - </td>
                                                                                </tr>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <% } %>
                                                    </div>
                                                </div>
                                            </div>
                                            

                                            <div class="tab-pane" id="tab_5">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <%
                                                            Evan.Model.SysModel.HtmlHelperModel IsSeo = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否显示SEO设置", PlaceHoder = "SEO", Notice = "栏目内容是否显示SEO设置项", FieldName = "IsSeo", FieldVerify = "", MaxLength = 50, FieldType = "switch", DefaultValue="1" };
                                                            Evan.Model.SysModel.HtmlHelperModel IsCreatePage = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否显示生成设置", PlaceHoder = "生成", Notice = "栏目是否有生成项 , 前提是站点为生成静态", FieldName = "IsCreatePage", FieldVerify = "", MaxLength = 50, FieldType = "switch", DefaultValue = "0" };
                                                            Evan.Model.SysModel.HtmlHelperModel IsExport = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否有导出", PlaceHoder = "导出", Notice = "栏目是否可以导出数据", FieldName = "IsExport", FieldVerify = "", MaxLength = 50, FieldType = "switch" , DefaultValue = "0"};
                                                            Evan.Model.SysModel.HtmlHelperModel IsVisualEdit = new Evan.Model.SysModel.HtmlHelperModel { Title = "是否有可视化编辑", PlaceHoder = "vEdit", Notice = "栏目是否有可视化编辑", FieldName = "IsVisualEdit", FieldVerify = "", MaxLength = 50, FieldType = "switch", DefaultValue = "0" };

                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(IsSeo));
                                                            if (SiteConfig.WebMode==2) {
                                                                Response.Write(Evan.Common.HtmlHelper.HtmlBuild(IsCreatePage));
                                                            }
                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(IsExport));
                                                            Response.Write(Evan.Common.HtmlHelper.HtmlBuild(IsVisualEdit));
                                                        %>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>

                                        <div class="form-actions form-submit-row">
                                            <div class="form-group">
                                                <label class="control-label col-md-2"></label>
                                                <div class="col-md-6">
                                                    <button type="button" data-loading-text="提交中.." class="btn green channel-submit"><i class="fa fa-check"></i> 提交</button>
                                                    
                                                </div>
                                            </div>  
                                            <div class="clear"></div>
                                        </div>

                                    </div>

                    
                    <!-- END PAGE CONTENT-->
                </div>
                <!-- END CONTENT BODY -->
            </div>
            <!-- END CONTENT -->
            
        </div>
        <!-- END CONTAINER -->
        <!-- #include file="../include/footer.inc" -->
   <!-- #include file="../include/com_res_js.inc" -->
    </body>

    
       <script  type="text/javascript">
           
           var model = <%=(Evan.Model.ConvertModel.ConvertToJson(Model))%>;
           SetModel(model);
    </script>
    <script  type="text/javascript" src="<%=SiteConfig.WebAdminPath %>assets/custom/js/channel.js" ></script>
    <script type="text/javascript">

        if (parseInt(model.PageType) == 20) {
            $("input[field='ManagePageUrl']").closest(".form-group").removeClass("hide");
        } else {
            $("input[field='ManagePageUrl']").closest(".form-group").addClass("hide");
        }

        $(function(){
            $(".ChannelCategory").val($("input[field='WebPath']").val());
            $("input[field='WebPath']").on("blur",function(){ 
                $(".ChannelCategory").val($(this).val());
            });

            //$("input[field='Title']").on("blur",function(){ 
            //    $("input[field='SubTitle']").val($(this).val());
            //    $("input[field='EnTitle']").val($(this).val());
            //});

            //$(".setRegValue").on("click",function(){
            //    $(this).parent().prev().val($(this).html());  
            //});

        })
    </script>
</html>


